import axios from './axios'

const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.2.104:8888/play' : '/play'

export const getZyData = (param) => {
  return axios.request({
      url: baseUrl + '/api/start',
      method: 'get',
      data: param
  })
}

export const getRandomData = (param) => {
  const {start, count} = param;
  return axios.request({
      url: baseUrl + '/api/random?start='+start+"&count="+count,
      method: 'get'
  })
}

export const getMsg = (param) => {
  const {code} = param;
  return axios.request({
      url: baseUrl + '/api/msg?code=' + code,
      method: 'get'
  })
}